$class('page').extends('XX').via(function() {
    "use strict";
    this.construct = function () {
        this.getParent().construct.apply(this, Array.prototype.slice.call(arguments));
        var $_ = this;
        
    };

    $(".forward").on("tap","li",function(){
        var url,title;
        var ua = navigator.userAgent.toLowerCase(), toString = Object.prototype.toString, slice = Array.prototype.slice;
    // 定义平台适配器
        
        title = $(this).find("a").attr("data-title");
        if(ua.indexOf('android') != -1 || ua.indexOf('iphone os') != -1 || ua.indexOf('ipad') != -1){
            url = $(this).find("a").attr("u");
            $$.Native.forward({
                url:url,
                title:""
            });
        }else{
            url = $(this).find("a").attr("data-url");
            window.location.href="../../" + url;
        }

    });

    $(".back").on("tap","li",function(e){
         if ( e && e.preventDefault ){e.preventDefault();}
        var url,title;
        var ua = navigator.userAgent.toLowerCase(), toString = Object.prototype.toString, slice = Array.prototype.slice;
    // 定义平台适配器
        title = $(this).find("a").attr("data-title");
        if(ua.indexOf('android') != -1 || ua.indexOf('iphone os') != -1 || ua.indexOf('ipad') != -1){
            url = $(this).find("a").attr("u");
            $$.Native.back({
                url:url
            });
        }else{
            url = $(this).find("a").attr("data-url");
            window.location.href="../../" + url;
        }
    });
    
});
var obj = new page();